home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / COMMUNIC / 2500.ZIP / PORTFIND.ZIP / COMMTEST.BAT next >
DOS Batch File  |  1990-07-07  |  3KB  |  98 lines

  1. echo off
  2. if not exist pf.com goto :error
  3. cls
  4. echo ***********************************************************
  5. echo ***  You can use Port Finder in a batch file to deter-  ***
  6. echo ***  mine the number of COM ports that are installed in ***
  7. echo ***  any IBM compatible computer.  Press any key now to ***
  8. echo ***  see how many COM ports your computer has.......... ***
  9. echo ***********************************************************
  10. echo .
  11. pause
  12. cls
  13. pf %1 %2 >nul
  14. echo ***********************************************************
  15. if errorlevel 15 goto 15port
  16. if errorlevel 14 goto 14port
  17. if errorlevel 13 goto 13port
  18. if errorlevel 12 goto 12port
  19. if errorlevel 11 goto 11port
  20. if errorlevel 10 goto 10port
  21. if errorlevel 9 goto 9port
  22. if errorlevel 8 goto 8port
  23. if errorlevel 7 goto 7port
  24. if errorlevel 6 goto 6port
  25. if errorlevel 5 goto 5port
  26. if errorlevel 4 goto 4port
  27. if errorlevel 3 goto 3port
  28. if errorlevel 2 goto 2port
  29. if errorlevel 1 goto 1port
  30. if errorlevel 0 goto 0port
  31. :0port
  32. echo ************* You have no COM ports! **********************
  33. goto endall
  34. :1port
  35. echo ************* You have COM port 1 *************************
  36. goto endall
  37. :2port
  38. echo ************* You have COM port 2 *************************
  39. goto endall
  40. :3port
  41. echo ************* You have COM ports 1 and 2 ******************
  42. goto endall
  43. :4port
  44. echo ************* You have COM port 3 *************************
  45. goto endall
  46. :5port
  47. echo ************* You have COM ports 1 and 3 ******************
  48. goto endall
  49. :6port
  50. echo ************* You have COM ports 2 and 3 ******************
  51. goto endall
  52. :7port
  53. echo ************* You have COM ports 1, 2, and 3 **************
  54. goto endall
  55. :8port
  56. echo ************* You have COM port 4 *************************
  57. goto endall
  58. :9port
  59. echo ************* You have COM ports 1 and 4 ******************
  60. goto endall
  61. :10port
  62. echo ************* You have COM ports 2 and 4 ******************
  63. goto endall
  64. :11port
  65. echo ************* You have COM ports 1, 2, and 4 **************
  66. goto endall
  67. :12port
  68. echo ************* You have COM ports 3 and 4 ******************
  69. goto endall
  70. :13port
  71. echo ************* You have COM ports 1, 3, and 4 **************
  72. goto endall
  73. :14port
  74. echo ************* You have COM ports 2, 3, and 4 **************
  75. goto endall
  76. :15port
  77. echo ************* You have COM ports 1, 2, 3, and 4 ***********
  78. :endall
  79. echo ***********************************************************
  80. echo .
  81. echo ***********************************************************
  82. echo ** To see how this batch file works, enter the following **
  83. echo ** command at the DOS prompt: "type commtest.bat |more"  **
  84. echo ** or to print it out enter: "type commtest.bat >prn".   **
  85. echo **      Thank You for using Port Finder ! ! ! ! !        **
  86. echo ***********************************************************
  87. goto :end
  88. :error
  89. cls
  90. echo .
  91. echo ***********************************************************
  92. echo ** The file PF.COM must be in the same default directory **
  93. echo ** as COMMTEST.BAT.  Please have these two files in the  **
  94. echo ** same default directory before running COMMTEST.BAT.   **
  95. echo ***********************************************************
  96. echo .
  97. :end
  98. echo on